<div class="shoping-car-bg" [ngStyle]="tagData.cssStyle | styleFilter">

  <ng-container *ngFor="let item of tagData.data.data, let i = index">

    <!-- item -->
    <div class="item-bg" [ngStyle]="item.itemBgCssStyle | styleFilter">
      <div *ngIf="item.title" class="item-title" [ngStyle]="item.title?.cssStyle | styleFilter">{{item.title.label}}
      </div>
      <div class="item-content">
        <img class="item-img" *ngIf="item.img?.imgUrl" [ngStyle]="item.img?.cssStyle | styleFilter"
          src="{{item.img.imgUrl}}" alt="" appDebounceClick (debounceClick)="openPage(item.link,$event)"
          onerror="this.src='assets/img/default_img.png'">
        <div class="item-content-bg">
          <p class="title" *ngIf="item.firstRowLeft?.firstText?.label"
            [ngStyle]="item.firstRowLeft.firstText.cssStyle | styleFilter">{{item.firstRowLeft.firstText.label}}</p>

          <div class="item-introduce" [ngStyle]="item.secondRowLeft.firstText.cssStyle | styleFilter">
            <p class="class" appDebounceClick (debounceClick)="openPage(item.secondRowLeft.chooseLink?.link,$event,i)"
              *ngIf="item.secondRowLeft?.firstText?.label"
              [ngStyle]="item.secondRowLeft.firstText.labelCssStyle | styleFilter">
              <span
                [ngStyle]="item.secondRowLeft.firstText.labelOnCssStyle | styleFilter">{{item.secondRowLeft.firstText.label}}</span>
              <img class="down" *ngIf="item.secondRowLeft?.chooseLink?.link"
                [ngStyle]="item.secondRowLeft.firstText.iconCssStyle | styleFilter"
                src="{{item.secondRowLeft.firstText.imgUrl}}" />
            </p>
            <span class="delete"
              appDebounceClick (debounceClick)="deleteItem(i, $event,item.secondRowRight?.submit,tagData.data.data,tagData.data.footDiv?.details,tagData.data.footDiv?.details2)"
              [ngStyle]="item.secondRowRight?.firstText?.cssStyle| styleFilter">
              {{item.secondRowRight?.firstText?.label}}
            </span>
          </div>
          <div class="s-bg">
            <p class="s-price">
              <span class="s-unit" *ngIf="item.thirdRowLeft?.firstText?.label"
                [ngStyle]="item.thirdRowLeft.firstText.cssStyle | styleFilter ">{{item.thirdRowLeft.firstText.label}}</span>
              <span *ngIf="item.thirdRowLeft?.secondText?.label"
                [ngStyle]="item.thirdRowLeft.secondText.cssStyle | styleFilter ">{{(getInterger(item.thirdRowLeft.secondText.label
                - 0)| currency:'CNY':'':'1.0-0')}}<i class="pirce-digits">{{(item.thirdRowLeft.secondText.label - 0 |
                  currency:'CNY':'':'0.2-2') + '' | slice:-3}}</i></span>
            </p>
            <div class="num-bg" [ngStyle]="item.thirdRowRight?.itemCssStyle| styleFilter ">
              <img src="assets/fw/sub_black.png" alt=""
                [ngStyle]="item.thirdRowRight?.subCssStyle | styleFilter" class="sub"
                appDebounceClick (debounceClick)="sub($event,item.thirdRowRight.submit,item,0,tagData.data.data,tagData.data.footDiv?.details,tagData.data.footDiv?.details2)">
              <ion-input [readonly]="item.thirdRowRight.inventory == 0" onkeyup="value=value.replace(/[^\d]/g,'')"
                onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
                [ngStyle]="item.thirdRowRight?.valueCssStyle| styleFilter "
                (ionChange)="changeValue_mid($event,item.thirdRowRight.submit,item,tagData.data.data,tagData.data.footDiv?.details)"
                type="number" class="num" [(ngModel)]="item.thirdRowRight.inputBox.label">
              </ion-input>
              <img src="assets/fw/add_black.png" alt=""
                [ngStyle]="item.thirdRowRight?.addCssStyle | styleFilter" class="add"
                appDebounceClick (debounceClick)="sub($event,item.thirdRowRight.submit,item,1,tagData.data.data,tagData.data.footDiv?.details,tagData.data.footDiv?.details2)">
            </div>
          </div>
          <!-- 成本价 -->
          <div class="item-cost" *ngIf="item.fourthRowRight"
            [ngStyle]="item.fourthRowRight.style?.cssStyle | styleFilter">
            <span *ngIf="item.fourthRowRight.firstText" class="firstText"
              [ngStyle]="item.fourthRowRight.firstText.cssStyle | styleFilter">{{item.fourthRowRight.firstText.label}}</span>
            <span *ngIf="item.fourthRowRight.secondText" class="secondText"
              [ngStyle]="item.fourthRowRight.secondText.cssStyle | styleFilter">{{item.fourthRowRight.secondText.label}}</span>
            <span class="secondRowRight"
              [ngStyle]="item.fourthRowRight.secondRowRight.cssStyle | styleFilter">{{item.fourthRowRight.secondRowRight.label}}</span>
          </div>
          <!-- 每类商品的优惠金额 -->
          <div class="item-discount" *ngIf="item.fifthRowRight"
            [ngStyle]="item.fifthRowRight.style?.cssStyle | styleFilter">
            <span *ngIf="item.fifthRowRight.firstText"
              class="discount-left">{{item.fifthRowRight.firstText?.label}}</span>
            <span class="discount-right">
              <span *ngIf="item.fifthRowRight.secondText"
                class="discount-right-extra">{{item.fifthRowRight.secondText?.label}}</span>
              <ion-input *ngIf="item.fifthRowRight.secondRowRight" class="discount-right-input"
                [(ngModel)]="item.fifthRowRight.secondRowRight.label" type="number"
                [ngStyle]="item.fifthRowRight.secondRowRight.cssStyle | styleFilter"
                (ionChange)="changeValue($event, item.fifthRowRight.secondRowRight, tagData.data.footDiv?.details2, tagData.data.footDiv?.details, item.fifthRowRight.submit)">
              </ion-input>
            </span>
          </div>
        </div>
      </div>
    </div>

  </ng-container>


  <div class="footer_1" [ngStyle]="tagData.data.footDiv?.footerCssStyle?.footerOneCssStyle | styleFilter">
    <ng-container *ngFor="let item of tagData.data.footDiv?.details;let i = index">

      <div class="footer_1_item" [ngStyle]="item.boxCssStyle?.cssStyle | styleFilter">
        <span class="left_1" [ngStyle]="item.left?.cssStyle | styleFilter">{{item.left?.label}}</span>

        <span class="right_1">
          <span class="right-unit"
            [ngStyle]="item.right?.firstText?.cssStyle | styleFilter">{{item.right?.firstText?.label}}</span>
          <span class="number"
            [ngStyle]="item.right?.secondText?.cssStyle | styleFilter">{{(getInterger(item.right?.secondText?.label - 0
            )| currency:'CNY':'':'1.0-0')}}<i class="pirce-digits">{{(item.right?.secondText?.label - 0 |
              currency:'CNY':'':'0.2-2') + '' | slice:-3}}</i></span>
        </span>

      </div>
    </ng-container>
  </div>

  <div class="footer_2" [ngStyle]="tagData.data.footDiv?.footerCssStyle?.footerTwoCssStyle | styleFilter">
    <ng-container *ngFor="let item of tagData.data.footDiv?.details2;let i = index">
      <!-- 分割线 -->
      <p *ngIf="item.isLine && item.isLine === true" class="line"></p>
      <div class="footer_2_item" [ngStyle]="item.boxCssStyle?.cssStyle | styleFilter">
        <span class="left_2" [ngStyle]="item.left?.cssStyle | styleFilter">{{item.left?.label}}</span>
        <span class="right_2">
          <!--优惠金额-->
          <ng-container *ngIf="item.left.discount!==undefined">
            <span class="right-unit"
              [ngStyle]="item.right?.firstText?.cssStyle | styleFilter">{{item.right?.firstText?.label}}</span>
            <span class="number" *ngIf="disCount !== 'null'"
              [ngStyle]="item.right?.secondText?.cssStyle | styleFilter">{{(getInterger(disCount - 0)|
              currency:'CNY':'':'1.0-0')}}<i class="pirce-digits">{{(disCount - 0 | currency:'CNY':'':'0.2-2') + '' |
                slice:-3}}</i></span>
          </ng-container>
          <!--利润-->
          <ng-container *ngIf="item.left.profit!==undefined">
            <span class="right-unit"
              [ngStyle]="item.right?.firstText?.cssStyle | styleFilter">{{item.right?.firstText?.label}}</span>
            <span class="number" *ngIf="profit !== 'null'"
              [ngStyle]="item.right?.secondText?.cssStyle | styleFilter">{{(getInterger(profit - 0 )|
              currency:'CNY':'':'1.0-0')}}<i class="pirce-digits">{{(profit - 0 | currency:'CNY':'':'0.2-2') + '' |
                slice:-3}}</i></span>
          </ng-container>
          <ng-container *ngIf="item.left.profit===undefined&&item.left.discount===undefined">
            <span class="right-unit"
              [ngStyle]="item.right?.firstText?.cssStyle | styleFilter">{{item.right?.firstText?.label}}</span>
            <span class="number" *ngIf="item.right?.secondText?.label !== undefined"
              [ngStyle]="item.right?.secondText?.cssStyle | styleFilter">{{(getInterger(item.right?.secondText?.label -
              0 )| currency:'CNY':'':'1.0-0')}}<i class="pirce-digits">{{(item.right?.secondText?.label - 0 |
                currency:'CNY':'':'0.2-2') + '' | slice:-3}}</i></span>
            <span *ngIf="item.right?.secondText?.defaultText" [ngStyle]="item.right?.secondText?.cssStyle | styleFilter"
              appDebounceClick (debounceClick)="modeBtn(item.right?.secondText)">{{item.right?.secondText?.defaultText}}<img
                [src]="item.right?.icon" [ngStyle]="item.right?.secondText?.iconCssStyle | styleFilter" /></span>
          </ng-container>
        </span>
      </div>

      <p *ngIf="item.secondText?.label" class="item-secondText" [ngStyle]="item.secondText?.cssStyle | styleFilter">
        {{item.secondText?.label}}</p>
    </ng-container>
  </div>

</div>